<template>
	<view v-if="isVerify" class="not-open">
		该功能暂未开通
	</view>
	<view v-else>
		<view class="main-box">
			<view>
				<view class="times" >
					<youku-newtcq-time></youku-newtcq-time>
				</view>
				
				<image id="form-box" mode="widthFix" class="bg-image" :src="imagePath+'cxqs.png'"></image>

				<view class="main-form-box">

					<youku-newtcq-mobilex :mobile="formData.mobile" :param="formData.param" :submit="formData.submit"
						:baseImagePath="imagePath" :btnImg="imagePath + 'submit-btn.png'"></youku-newtcq-mobilex>
						<view class="" style="margin-top: 360rpx;">
							<view class="tip-text">
							业务资费：连续包月29.9元/月(可随时取消)
							</view>
							<view class="tip-text">
							续订权益：29.9元=优酷视频会员月卡+30元支付宝立减金
							</view>
							<view class="tip-text">
								客服热线：400-8825-010
							</view>
						
						</view>
				</view>

			</view>
		

		</view>



	</view>
</template>

<script>
	import httpUtil from "@/utils/httpUtil";
	import commonApi from "@/api/commonApi";
	import messageUtil from "@/utils/messageUtil.js"
	import logApi from "@/api/logApi";
	import userApi from "../../api/userApi";
	import paramApi from "../../api/paramApi";


	export default {
		data() {
			return {
				isVerify: false,
				scrollTop: 0,
				imagePath: 'https://web.78keji.cn/images/xiaowu/newyks/',
				scrollToTargetId: "form-box",
				formData: {
					mobile: '',
					param: '',
					submit: 0,
					intervalId: '',
				}
			}
		},
		onLoad(option) {
			this.initData(option)
			my.hideBackHome()
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop
		},
		methods: {
			uuid() {
				var s = [];
				var hexDigits = "0123456789abcdef";
				for (var i = 0; i < 36; i++) {
					s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
				}
				s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
				s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
				s[8] = s[13] = s[18] = s[23] = "-";

				var uuid = s.join("");
				uni.setStorageSync('uuid', uuid)
				return uuid;
			},
			initData(option) {
				// option.a = "123aaa"
				// option.param = "11"

				logApi.addYouKuLog('youku_ljj2_full option:' + JSON.stringify(option))
				paramApi.initData(option)

				commonApi.is404()
				if (!userApi.getUserId()) {
					userApi.initUserId()
				}

				if (option.submit) {
					this.formData.submit = option.submit
				}

				commonApi.isVerify(res => {
					this.isVerify = res
				})

				commonApi.buriedPoint(63)

				let paramx = {
					a: httpUtil.getA(),
					proCode: 'LH2506',
					uuid: this.uuid()
				}
				httpUtil.post('/api/tongji/tongji0520', paramx, res => {

				})

				// 下面这个不需要调用，因为阳兄写了一个
				// userApi.initUserId()
			},
		}
	}
</script>

<style lang="scss">
	.times{
		position: absolute;
		top: 810rpx;
		left:160rpx
	}
	.not-open {
		height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #000;
	}

	.main-box {
		background-color: #efffe4;
		min-height: 100vh;
		padding-bottom: 20rpx;
	}

	.main-form-box {
		width: 90%;
		position: absolute;
		left: 5%;
		top: 930rpx;
		margin: 10rpx auto 0;
	}

	.mobile-roll-left-box {
		margin-top: 10rpx;
	}

	.bg-image {
		width: 100%;
		height: auto;
	}

	.tip-text {
		letter-spacing: 2rpx;
		font-size: 20rpx;
		color: black;
		text-align: center;
		margin-top: 16rpx;
	}
</style>